package com.tuju.jetpackfirstdemo.adapter

import android.view.View
import android.view.ViewGroup
import com.tuju.jetpackfirstdemo.R
import com.tuju.jetpackfirstdemo.base.baseadapter.BaseRecyclerViewAdapter
import com.tuju.jetpackfirstdemo.base.baseadapter.BaseRecyclerViewHolder
import kotlinx.android.synthetic.main.item_text.view.*

class FlexAdapter : BaseRecyclerViewAdapter<String>() {
    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseRecyclerViewHolder<String> {
        return ViewHolder(getView(parent, R.layout.item_text))
    }

    inner class ViewHolder(view: View) : BaseRecyclerViewHolder<String>(view){
        override fun onBaseBindViewHolder(t: String, position: Int) {
            view.tv_text.text = t
        }
    }

}